package com.weipai.springboot.module.dao.impl;

import com.weipai.springboot.model.CustomerFootprint;
import com.weipai.springboot.module.dao.CustomerFootprintDao;
import com.weipai.springboot.module.mapper.CustomerFootprintMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author: 曹朋飞
 * @Date: 2018/09/14 19:41
 */
@Repository
public class CustomerFootprintDaoImpl implements CustomerFootprintDao {
    
    @Autowired
    CustomerFootprintMapper customerFootprintMapper;
    
    
    @Override
    public List<Map<String, Object>> selectAllByCustomerFootprint(String customerId, Integer page, Integer size) {
        return customerFootprintMapper.selectAllByCustomerFootprint(customerId,page,size);
    }

    @Override
    public List<CustomerFootprint> verCustomerFootprint(String customerId, String goodsId) {
        return customerFootprintMapper.verCustomerFootprint(customerId, goodsId);
    }

    @Override
    public int insert(CustomerFootprint customerFootprint) {
        return customerFootprintMapper.insertSelective(customerFootprint);
    }

    @Override
    public int deleteByPrimaryKey(String footprintId) {
        return customerFootprintMapper.deleteByPrimaryKey(footprintId);
    }

    @Override
    public int deleteByCustomer(String customerId) {
        return customerFootprintMapper.deleteByCustomer(customerId);
    }
}
